package com.novacloud.mq;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author <a href="mailto:huzhanjun@novacloud.com">huzj</a>
 * @version 1.0
 * @date 2017/9/28 9:45
 */
@Component
public class MqSender {
    @Autowired
    private AmqpTemplate amqpTemplate;

    public void helloSend(String message) {
        amqpTemplate.convertAndSend("hello", message);
    }

    public void testSender(String message) {
        amqpTemplate.convertAndSend("test", message);
    }
}
